package com.jfinal.entity;

import com.jfinal.plugin.activerecord.Model;
import com.jfinal.plugin.activerecord.Page;

/**
 * Created by li on 2016/7/16.
 */
public class User extends Model<User> {

    private static final long serialVersionUID = -3649555563326235483L;

    // 方便于访问数据库，不是必须
    public static final User dao = new User();

    public Page<User> paginate(int pageNumber, int pageSize) {
        //这里体会到了jfinal的强大之处，mysql和oracle的分页都只需下面这一句就可以了。。
        return paginate(pageNumber, pageSize, "select * ","from user order by id asc");
    }
}
